package com.banmao.c02_abstract_factory;

import com.banmao.c02_abstract_factory.Buttons.Button;
import com.banmao.c02_abstract_factory.checkboxs.Checkbox;
import com.banmao.c02_abstract_factory.factory.GUIFactory;

public class Application {

    private Button button;
    private Checkbox checkbox;

    public Application(GUIFactory factory) {
        button = factory.createButton();
        checkbox = factory.createCheckbox();
    }

    public void paint() {
        button.paint();
        checkbox.paint();
    }

}
